import request from './request'

// 限时营销管理API
export const limitApi = {
  // 查询限时营销
  getLimitList(data) {
    return request({
      url: '/limit/find',
      method: 'post',
      data
    })
  },

  // 新增限时营销
  addLimit(data) {
    return request({
      url: '/limit/insert',
      method: 'post',
      data
    })
  },

  // 修改限时营销
  updateLimit(data) {
    return request({
      url: '/limit/update',
      method: 'put',
      data
    })
  },

  // 删除限时营销
  deleteLimit(id) {
    return request({
      url: '/limit/delete',
      method: 'delete',
      params: { id }
    })
  }
}